home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
allfiles
/
angry
/
intro.dir
/
00003_Script_cursorLoop
< prev
next >
Wrap
Text File
|
1999-03-01
|
3KB
|
132 lines
global oldMouseP
global drops
global cursorSpr
global animate
global gravite
on enterFrame
if not(soundBusy(1)) then puppetSound 1, member "fuckhead"
if the mouseV > 400 then
if the member of sprite(7) <> member "navbarupLonger" then
set the member of sprite(7) = member "navbarupLonger"
set the loc of sprite 7 to point(320, 491)
end if
if the mouseH < 80 then
set the member of sprite(5) to member "QuitON"
else if the mouseH > 550 then
set the member of sprite(6) to member "creditsON"
else
set the member of sprite(5) to "QuitOFF"
set the member of sprite(6) to "creditsOFF"
end if
else
if the member of sprite(7) <> member "navBarDOWNLonger" AND the member of sprite(7) <> member "infobarON" then
set the member of sprite(7) to member "navBarDOWNLonger"
set the loc of sprite 7 to point(320, 491)
set the member of sprite(5) to "QuitOFF"
set the member of sprite(6) to "creditsOFF"
end if
end if
-- main cursor
set mouseP = point(the mouseH, the mouseV)
if inside(mouseP, rect(0, 0, 640, 480)) then cursor 200
else cursor -1
set diffP = mouseP - oldMouseP
set horiz = getAt(diffP, 1)
set vert = getAt(diffP, 2)
set drop = TRUE
if horiz < -5 then
if vert < -5 then
set the member of sprite(cursorSpr) to member "northwest"
else if vert > 5 then
set the member of sprite(cursorSpr) to member "southwest"
else
set the member of sprite(cursorSpr) to member "west"
end if
else if horiz > 5 then
if vert < -5 then
set the member of sprite(cursorSpr) to member "northeast"
else if vert > 5 then
set the member of sprite(cursorSpr) to member "southeast"
else
set the member of sprite(cursorSpr) to member "east"
end if
else
if vert < -5 then
set the member of sprite(cursorSpr) to member "north"
else if vert > 5 then
set the member of sprite(cursorSpr) to member "south"
else
set the member of sprite(cursorSpr) to member "stop"
set drop = FALSE
end if
end if
set the loc of sprite cursorSpr to mouseP
-- little droplets
repeat with a = 1 to count(drops)
set doMe = getAt(drops, a)
check doMe
end repeat
if random(2) = 2 AND drop then
repeat with a = 1 to count(drops)
set doMe = getAt(drops, a)
if not(the pActive of doMe) then
drop doMe, cursorSpr
exit repeat
end if
end repeat
end if
set oldMouseP = point(the mouseH, the mouseV)
-- Animation loops
set animLoop = TRUE
repeat with i = 1 to count(animate)
set doMe = getAt(animate, i)
animLoop doMe
end repeat
set animLoop = FALSE
set gravitate = TRUE
if count(gravite) > 0 then
repeat with x = 1 to count(gravite)
set doMe = getAt(gravite, x)
gravitate doMe
end repeat
end if
set gravitate = FALSE
end
on exitFrame
go to the frame
end